
public class No4 {

	public static void main(String[] args) {
		 int x, y;
         for (int i = 1; i <= 1000; i++)
         {
             x = (int)Math.sqrt(i + 100); 
             y = (int)Math.sqrt(i + 268); 
             if ((x * x == (i + 100)) &&  (y * y == (i + 268)))
             {
                 System.out.println(i);
             }
         }
	}

}
